<form class="layui-form layui-col-md11" lay-filter="tpl_goods{$goods_sign}" action="{:url('Goods/saveData')}">
	<input type="hidden" name="goods_sign" class="layui-input" />
	<input type="hidden" name="goods_id" class="layui-input" />
	<input type="hidden" name="callet_juncai" value="" />
<style>.addRedStar:after {content: '*';color: red;font-size: 20px;vertical-align: middle;}
	.zhushi{color: #999; line-height:40px;}
	</style>
<script> 
function check(str){ 
	return str
var temp="" 
for(var i=0;i<str.length;i++) 
     if(str.charCodeAt(i)>0&&str.charCodeAt(i)<255) 
        temp+=str.charAt(i) 
return temp 
} 
</script>
<div class="layui-form-item">
		<label class="layui-form-label">审核状态</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		    <p><font class="zhushi">如审核状态与供应商端不一致，可通过此选项调整</font></p>
		    
			<select name="audit_state" lay-verify="required">
				<option value="1" selected>通过</option>
				<option value="2">审核中</option>
				<option value="-1">驳回</option>
			</select>
		</div>
	</div>
	<div class="layui-form-item">
	    
		<label class="layui-form-label addRedStar">产品分类</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		<p><font class="zhushi">无法选到明确分类的产品，不可以新增上架（不应选含糊擦边的分类，新增也审核不过）</font></p>
		<div class="layui-input-inline">
			<select name="category_sign1" lay-verify="required" id="category_level1_{$goods_sign}" lay-filter="category_level1_{$goods_sign}" lay-search>
			</select>
		</div>
		<div class="layui-input-inline">
			<select name="category_sign2" lay-verify="required" id="category_level2_{$goods_sign}" lay-filter="category_level2_{$goods_sign}" lay-search>
			</select>
		</div>
		<div class="layui-input-inline">
			<select name="category_sign3" lay-verify="required" id="category_level3_{$goods_sign}" lay-filter="category_level3_{$goods_sign}" lay-search>
			</select>
		</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">品牌</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		    <p><font class="zhushi">没有的品牌，请在群里联系李浩或者业务经理添加</font></p>
			
		<div class="layui-input-inline">
			<input style="width: 0px;height: 0px;border: 0px;" type="text" name="brand_sign" lay-filter="goods_brand_{$goods_sign}" id="brand_sign" lay-verify="required" autocomplete="off" class="layui-input">
			<div class="layui-form-select">
				<div class="layui-select-title">
					{if condition="menuAuth('goods_add_brand')"}
					<input id="goods_brand_div_{$goods_sign}" type="text" placeholder="请选择" value="" class="layui-input">
					<i class="layui-edge"></i>
					{else /}
					<input id="goods_brand_div_{$goods_sign}" type="text" placeholder="请选择" value="" class="layui-input" disabled="disabled">
					<i class="layui-edge"></i>
					{/if}
				</div>
				<dl class="layui-anim layui-anim-upbit" id="select_brand_{$goods_sign}" style="">
					<dd lay-value="" class="layui-select-tips layui-this">请选择</dd>
				</dl>
			</div>
			<!-- <select name="brand_sign" id="goods_brand_{$goods_sign}" lay-verify="required" lay-filter="goods_brand_{$goods_sign}" lay-search>
			</select> -->
		</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">商品名称</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="goods_name" lay-verify="required" placeholder="【所填写的不是最终显示名称】名称将由平台审核后自动生成（在所填写的参数中提取组合）" autocomplete="off" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">京东编号</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="jd_goods_sku" id="jd_goods_sku" placeholder="由于京东规则改变，本月暂时无法采集" autocomplete="off" class="layui-input" style="width:40%; display:inline;"><button class="layui-btn layui-btn-disabled layui-btn-sm caiji_jd" type="button" disabled="disabled">京东采集</button>
		</div>
	</div>
		<div class="layui-form-item">
		<label class="layui-form-label addRedStar">商品编号</label>
		<div class="layui-input-inline">
			<input type="text" name="goods_sku" lay-verify="required" placeholder="" autocomplete="off" class="layui-input" style="width:60%; display:inline;"><font class="zhushi">自动生成</font>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">商品型号</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		<p><font class="zhushi" style="line-height:30px;">商品型号：厂家提供的【型号或货号】：不能是电商编码或SKU码；不能包含品牌或品目信息</font></p>
		<div class="layui-input-inline">
			<input type="text" name="goods_model" lay-verify="required" placeholder="" autocomplete="off" class="layui-input" onkeyup="this.value=check(this.value)">

		</div>
		<div class="layui-form-mid layui-word-aux" style="padding-top: 4px!important;">
			<button class="layui-btn layui-btn-normal layui-btn-sm chk_goods_model" type="button">验证型号</button>
		</div>
		<div class="layui-form-mid layui-word-aux">
			
		</div>
	</div>
	</div>
		<div class="layui-form-item">
		<label class="layui-form-label">E标题</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="goods_son_name"  placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">E编码</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="upc" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">电商链接</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		    <p><font class="zhushi" >至少上传三条链接，可选京东自营、国美、苏宁、政采，必须真实有效，不得为失效链接，链接之间用英文输入法的逗号隔开</font></p>
			<input type="text" name="ziying_url" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">推送类型</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		    <p><font class="zhushi">类型选择重点库，优势：1、可下比价清单，2、报价速度快，3、方便维护，增加销售量</font></p>
			<select name="is_zhongdian" lay-verify="required" lay-filter="zhongdian_{$goods_sign}">
				<option value="0">自选产品</option>
				<option value="1" selected>重点产品</option>
				<option value="2">快速上架</option>
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">推送方式</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		    <p><font class="zhushi">首次推送：商品新增，军网驳回修改：除了主图修改选择图片更新，其他修改均选择商品信息更新</font></p>
			<select name="jun_update" lay-verify="required">
				<option value="1" selected>商品新增</option>
				<option value="2">商品信息更新</option>
				<option value="3">图片更新</option>
			</select>
		</div>
	</div>
	
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">商品单位</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		<p><font class="zhushi">例如“台”“个”“盒”</font></p>
			<input type="text" name="goods_unit" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item" style="display:none;">
		<label class="layui-form-label addRedStar">发票货物名称</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="product_firm" placeholder="此产品您对外开票时货物名称，如：硒鼓；冰箱；铅笔；签字笔；记事本；网线；面条机；碳粉；复印机；打印机；折叠床；笔记本电脑等" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item" style="display:none;">
		<label class="layui-form-label addRedStar">发票规格型号</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="invoice_model" placeholder="此产品您对外开票时的规格型号" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item" style="display:none;">
		<label class="layui-form-label addRedStar">税务分类</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="product_area"  placeholder="" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item" style="display:none;">
		<label class="layui-form-label addRedStar">税务分类编码</label>
		<div class="layui-input-block layui-col-md8 margin-left0 ">
			<input type="text" name="shuiwu_id" placeholder="19位数字编码" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">税率</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
		<p><font class="zhushi">默认：0.13，新鲜茶叶或蔬菜等：0.9；加工包装茶叶：0.13；杀虫剂农药：0.9；润滑油：0.13；食用油0.9或0.13；1请与您的财务人员确认</font></p>
		<div class="layui-input-inline">
			<input type="text" value="0.13" name="goods_keywords" lay-verify="required" autocomplete="off" class="layui-input">
		</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">69码</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="code_69" lay-verify="required" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">销售规格</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="sale_specifications" lay-verify="required" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">标准计量单位</label>
		<div class="layui-input-block layui-col-md8 margin-left0">
			<input type="text" name="standard_unit" lay-verify="required" autocomplete="off" class="layui-input">
		</div>
	</div>
<div class="layui-form-item">
	<label class="layui-form-label">备注</label>
	<div class="layui-input-block layui-col-md8 margin-left0">
		<input type="text" name="packing_list" autocomplete="off" class="layui-input">
	</div>
</div>
	<div class="layui-form-item">
		<label class="layui-form-label addRedStar">商品主图<br /><span style="font-size: 12px; color: #999999;">可拖动排序</span></label>
		<div class="layui-input-block">
		    <p><font class="zhushi">上传1-2张清晰商品全貌图，可增加1-2张细节图，非必须上传项</font></p>
			<blockquote class="layui-elem-quote layui-quote-nm">
				<div class="layui-upload-list layui-upload-list-goods item_container" id="layui-upload-list{$goods_sign}">
					<ul>
						
					</ul>
				</div>
				<div class="layui-upload-drag goods_pictures_upload" id="goods_pictures_upload{$goods_sign}">
					<i class="layui-icon layui-icon-upload"></i>
					<p>点击或拖拽上传</p>
				</div>
				<div style="clear: both;">

				</div>
			</blockquote>
		</div>


		<div class="layui-form-item">
			<label class="layui-form-label">销售属性</label>
			<div class="layui-input-block">
				<blockquote class="layui-elem-quote layui-quote-nm layui-form-pane" id="sale_attr{$goods_sign}">
					<div class="view_box"></div>
					<button type="button" id="sale_attr_pop_down{$goods_sign}" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon layui-icon-add-1"></i>新增属性</button>
				</blockquote>
			</div>
		</div>
	
		<div class="layui-form-item">
			<label class="layui-form-label addRedStar">销售价格<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="site_data{$goods_sign}" data-title="分站价格"><i class="layui-icon layui-icon-snowflake"></i></a></label>
			<div class="layui-input-block">
<p><font class="zhushi">不可与市场价差距太大，首次上架库存限制为0，平台会出参考价。<span style="color:#ff0000; font-weight:bolder;">请填写真实成本，后续用以报价核算</span><br>
请填写真实相对拿货价，只做报价参考值，避免报价亏损，若无拿货价，可填写0.</font></p>
				<blockquote class="layui-elem-quote layui-quote-nm layui-form-pane" id="sale_spu{$goods_sign}">

				</blockquote>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label addRedStar">商品属性</label>
			<div class="layui-input-block">
			    <p><font class="zhushi">根据链接，如实填写，相关证书若无请填写无，日期填写格式1990-01-01</font></p>
				<blockquote class="layui-elem-quote layui-quote-nm" id="goods_attr{$goods_sign}">
					请先选择分类
				</blockquote>
			</div> 
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">引用属性</label>
			<div class="layui-input-inline">
				<input type="checkbox" lay-text="是|否" lay-filter="quote_option" lay-skin="switch">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label addRedStar">详细信息</label>
			<div class="layui-input-block">
			    <p><font class="zhushi">商品详情由1-2张清晰告卖款商品全貌图、商品介绍、用途、规格或参数构成；详情中不得出现平台规定的敏感问：定制、防爆、苹果(APPLE)和军队相关的专有名词，不得出现动态图、不得出现不确定性词语，不得有PS痕迹</font></p>
				<textarea name="goods_content" id="goods_content{$goods_sign}"></textarea>
			</div>
		</div>
		<div class="layui-form-item" style="display: none;">
			<label class="layui-form-label">商品重量</label>
			<div class="layui-input-inline layui-input-number">
				<input type="number" value="0" name="weight" lay-verify="required|number" placeholder="" autocomplete="off" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">单位：克</div>
		</div>
	<!--	<div class="layui-form-item" style="display: none;">
			<label class="layui-form-label">是否包邮</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_shopping" lay-text="是|否" checked lay-skin="switch">
			</div>
		</div>
		<div class="layui-form-item" style="display: none;">
			<label class="layui-form-label">商品类型</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_real" lay-text="实物|虚拟" checked lay-skin="switch">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否需要安装</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_install" lay-text="需要|不需要" lay-skin="switch">
			</div>
		</div>
		
		
		{if condition="isset($get_site['site_id']) && ($get_site['site_id'] EQ 111 || $get_site['site_id'] EQ 115 || $get_site['site_id'] EQ 117)"}
		<div class="layui-form-item">
			<label class="layui-form-label">节能证书编号</label>
			<div class="layui-input-inline">
				<input type="text" name="energy_cert_no" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">节能证书地址</label>
			<div class="layui-input-inline">
				<input type="text" name="energy_cert_image" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">节能证书有效期</label>
			<div class="layui-input-inline">
				<input type="text" name="energy_cert_indate" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		{/if}
		<div class="layui-form-item">
			<label class="layui-form-label">是否环保</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_environmental" lay-text="是|否" lay-skin="switch">
			</div>
		</div>
		{if condition="isset($get_site['site_id']) && ($get_site['site_id'] EQ 111 || $get_site['site_id'] EQ 115 || $get_site['site_id'] EQ 117)"}
		<div class="layui-form-item">
			<label class="layui-form-label">环保证书编号</label>
			<div class="layui-input-inline">
				<input type="text" name="environment_protect_cert_no" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">环保证书地址</label>
			<div class="layui-input-inline">
				<input type="text" name="environment_protect_cert_image" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">环保证书有效期</label>
			<div class="layui-input-inline">
				<input type="text" name="environment_protect_cert_indate" placeholder="" autocomplete="off" class="layui-input">
			</div>
		</div>
		{/if}
		-->
		<div class="layui-form-item">
			<label class="layui-form-label addRedStar">是否节能环保</label>
			<div class="layui-input-block layui-col-md8 margin-left0">
			<p><font class="zhushi">如实填写</font></p>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_energy" lay-text="是|否" lay-skin="switch">
			</div>
			</div>
		</div>
		<div class="layui-form-item">
			<input type="hidden" name="last_sale_state" />
			<label class="layui-form-label">销售状态</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="sale_state" lay-text="销售|下架" checked lay-skin="switch">
			</div>
		</div>
	<!--	{if condition="isset($get_site['site_name']) && $get_site['site_name'] EQ '主站'"}
		<div class="layui-form-item">
			<label class="layui-form-label">分站采集</label>
			<div class="layui-input-inline">
				<input type="checkbox" name="is_copy" lay-text="可采集|不可采集" checked lay-skin="switch">
			</div>
		</div>
		{if condition="$goods_id NEQ ''"}
		<div class="layui-form-item">
			<label class="layui-form-label">同步到分站</label>
			<div class="layui-input-inline" style="width: auto;">
				<input type="checkbox" name="push_to_site" lay-filter="push_to_site" lay-text="是|否" lay-skin="switch">
			</div>
			<div class="layui-form-mid layui-word-aux" style="display: none;">如果采集过该商品则同步该数据</div>
		</div>
		{/if}
		{else /}
		<div class="layui-form-item">
			<label class="layui-form-label"></label>
			<div class="layui-input-block" style="color: #ff6600;">
				说明：修改产品在主站审核之前，分站将按修改前的产品信息进行销售。
			</div>
		</div>
		{/if}
		-->
		<div class="layui-form-item">
			<div class="layui-input-block">
				
				<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_goods">保存并推送</button>
				<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_goods_no_push">保存数据</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
			<div class="layui-input-block">
				<font style="color:#ff0000; font-size:14px; font-weight:bold;">上架通过后，需要自己先报价并且有三家报价才可展示点单</font>
				</div>
		</div>
</form>	
<script src="/static/ueditor/ueditor.all.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/ueditor/lang/zh-cn/zh-cn.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/js/goods/drag.js" type="text/javascript" charset="utf-8"></script>
<script>
	// 赋值
	var goods_sign = "{$goods_sign}";
	var goods_form_value = {$data};
	var category_select_uri = "{:url('Category/ajaxCategory')}";
	var brand_select_uri = "{:url('Brand/ajaxList')}";
	var attr_select_uri = "{:url('Attr/ajaxList')}";
	var sale_uri = "{:url('Sale/formTpl',array('goods_sign'=>$goods_sign))}";
	var um = UE.getEditor('goods_content{$goods_sign}');
	var chk_goods_model_uri = "{:url('Goods/chkModel')}";
	var goods_form_url = "{:url('goods/tplForm')}";
	var site_data_url = "{:url('goods/siteData')}";
	var push_neimeng_url = "{:url('goods/pushNeimengInfo')}";
	var push_qixin_url = "{:url('goods/pushQixinInfo')}";
	var push_zongyang_url = "{:url('@zyapi/api/product')}";
	var push_beijing_url = "{:url('@bjapi/api/product')}";
	var push_changshao_url = "{:url('@api/changsha/addGoods')}";
	var collect_base_url = "{:url('jdgoods/basecollect')}";
	um.ready(function(){
		if(goods_form_value.goods_content != undefined){
			um.setContent(goods_form_value.goods_content);
		}
	})
</script>

<script src="/static/js/goods/goods_tpl.js" type="text/javascript" charset="utf-8"></script>
